package com.itmk.teacher.service.impl;

import com.itmk.student_point.entity.StudentPoint;
import com.itmk.teacher.dao.TeacherDao;
import com.itmk.teacher.dao.impl.TeacherDaoImpl;
import com.itmk.teacher.entity.*;
import com.itmk.teacher.service.TeacherService;

import java.util.List;

public class TeacherServiceImpl implements TeacherService {
    private TeacherDao teacherDao = new TeacherDaoImpl();
    @Override
    public void add(Teacher teacher) {
        teacherDao.add(teacher);
    }

    @Override
    public List<Teacher> list(TeacherParm parm) {
        return teacherDao.list(parm);
    }

    @Override
    public int getCount(TeacherParm parm) {
        return teacherDao.getCount(parm);
    }

    @Override
    public Teacher getById(int teacherId) {
        return teacherDao.getById(teacherId);
    }

    @Override
    public void updateById(Teacher teacher) {
        teacherDao.updateById(teacher);
    }

    @Override
    public void delete(String teacherId) {
        teacherDao.delete(teacherId);
    }

    @Override
    public Teacher login(String teacherNum, String password) {
        return teacherDao.login(teacherNum,password);
    }

    @Override
    public List<TeacherVo> getTeachetList(TeacherCouresParm parm) {
        return teacherDao.getTeachetList(parm);
    }

    @Override
    public int getTeachetCount(TeacherCouresParm parm) {
        return teacherDao.getTeachetCount(parm);
    }

    @Override
    public List<TeacherStudentVo> listStu(TeacherParm parm) {
        return teacherDao.listStu(parm);
    }

    @Override
    public List<TeacherStudentVo> listInputStu(TeacherParm parm) {
        return teacherDao.listInputStu(parm);
    }

    @Override
    public int getStuCount(TeacherParm parm) {
        return teacherDao.getStuCount(parm);
    }

    @Override
    public void addPoint(StudentPoint studentPoint) {
        teacherDao.addPoint(studentPoint);
    }

    @Override
    public int getTotal() {
        return teacherDao.getTotal();
    }

    @Override
    public Teacher getUserByPas(int userId, String password) {
        return teacherDao.getUserByPas(userId,password);
    }

    @Override
    public void updatePassword(int userId, String password) {
        teacherDao.updatePassword(userId,password);
    }
}
